package demo;

import org.jsoup.select.Elements;

import app.netant.NetAntBase;

public class BcargoDetailAnt extends NetAntBase {

	public BcargoDetailAnt(String netSite) {
		super(netSite);
	}
	
	public String getFirstSale(){
		Elements activePart = document.select("#page #content .J_Layout.layout.grid-m .main-wrap.J_Region "
				+ ".tb-module.huichi-list #list-container #list-body #list-main #list-itemList .m-items "
				+ "ul.items.grid li.item .info .price strong");
		if(activePart.size()>1){
			return activePart.get(0).text();
		}else{
			return "0.0";
		}
	}
	
	public static void main(String[] args) {
		BcargoDetailAnt detail = new BcargoDetailAnt("https://chi.taobao.com/itemlist/huichi2014.htm?cat=50386025&sort=coefp&isprepay=1&at=45634&as=0&viewIndex=1&spm=a219e.8128116.chiNav.128.58fa5ff6Rf36kw&atype=b&style=grid&same_info=1&tid=0&isnew=2&_input_charset=utf-8");
		System.out.println(detail.getFirstSale());
	}
}
